package com.woniu.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.woniu.entity.PageData;
import com.woniu.entity.dto.CommentDTO;
import com.woniu.entity.vo.CommentVO;
import com.woniu.pojo.Comment;

import java.util.List;

/**
 * <p>
 *  服务类
 * </p>
 *
 * @author xiaosong
 * @since 2023-04-01
 */
public interface ICommentService extends IService<Comment> {
//分页查询
    PageData search(Integer currentPage, Integer pageSize, CommentDTO commentDTO);

//    按照id查询
    Comment selectById(Integer id);

    Integer updateComment(Comment comment);

    boolean add(Comment comment);

    Integer getUnread(Integer id);

    List<CommentVO> listRootCommentByTime(String trainingId);

    List<CommentVO> listRootCommentByLike(String trainingId);
}
